<!--#include file="pjson.asp"-->
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>表管理</title>
<%easp.include "h.asp"%>
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-card"><br>
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">

</div>	  
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">表名</label>
            <div class="layui-input-block">
              <input type="text" name="tn" class="layui-input">
            </div>
		
          </div>
		  
		<div class="layui-inline">
		<label class="layui-form-label">采集次数</label>
		<div class="layui-input-block">
		  <input type="text" name="cjcs" class="layui-input">
		</div>	
		</div>		  
	<%
	dim rs2,arr
	set rs2 = Easp.Db.Sel("select id,prn from prj")
	if rs2.recordCount >=1 then
		arr = rs2.GetRows	
		echo myopt2_no_required("prj_id","所属项目",arr,iif(val("prj_id") = "",0,val("prj_id")))
	end if
	%>		  
	  
          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="t_search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
			  <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="t_add">新增表</button>			
			  <button type="button" class="layui-btn layui-btn-normal" lay-submit lay-filter="t_del_sel">删除所选</button>			
          </div>
        </div>
      </div>

      <div class="layui-card-body">
		<script type="text/html" id="barDemo">
			<a class="layui-btn layui-btn-xs" lay-event="t_edit">修改</a>
			<a class="layui-btn layui-btn-xs" lay-event="t_prj">选择所属项目</a>
			<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="t_del">删除</a>
		</script>
		<table id="t" lay-filter="t"></table>
			<br>
      </div>
    </div>
  </div>

  <script src="../../../../src/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '../../../../src/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'useradmin', 'table'], function(){
    var $ = layui.$
    ,form = layui.form
    ,admin = layui.admin	
    ,table = layui.table;
    form.render();
	table.render({
        elem: '#t',
        url: layui.setter.base + 'lib/reg.asp?action=t_list',
        cols: [[
		{type:'checkbox'},		
        {
            field: 'id',title: 'ID',width: 60,
            sort: true,
			hide:false
        },
        {field: 'tn',title: '表名',width: 120},
        {field: 'prn',title: '所属项目',width: 120},
        {field: 'cjcs',title: '采集次数',width: 100},
        {
            fixed: 'right',
            width: 260,
            align: 'center',
            toolbar: '#barDemo'
        }]],
        id: 't',
        limit: 10,
        page: true,
        height: 475
    });
	<%
	Easp.Echo js1("add1.js","t","新增表")
	Easp.Echo js4("edit2.js","t","编辑表","t_prj","选择表所属的项目：")
	%> 
  });
  </script>
</body>
</html>